<template>
	<swiper @change="swiperTabChange" :current="currentTabBarIndex">
		<swiper-item v-for="(item, index) in tabBarList" :key="index" :item-id="index + ''">
			<view class="swiper-item">{{ item.name }}</view>
		</swiper-item>
	</swiper>
</template>

<script>
	export default {
		name:"ArticleList",
		props: {
			tabBarList: Array,
			currentTabBarIndex: {
				type: Number,
				default: 0
			}
		},
		data() {
			return {
				
			};
		},
		methods: {
			swiperTabChange(data) {
				this.$emit('changeTabBarIndexBySwiper', data.detail.currentItemId)
			}
		}
	}
</script>

<style>

</style>